{
    class Parent {
        constructor(name = 'huangliusong') {
            this.name = name
        }
    }
    let v_parent = new Parent('v')
    console.log('构造函数和实例：', v_parent);

}

{
    class Parent {
        constructor(name = 'huangliusong') {
            this.name = name
        }
    }

    class Child extends Parent {

    }

    console.log('Child继承Parent', new Child())
}

{
    //继承
    class Parent {
        constructor(name = 'hls') {
            this.name = name
        }
    }
    class Child extends Parent {
        constructor(name = "child") {
            super(name)
            this.type = 'child'
        }
    }

    console.log('继承传递参数', new Child('hello'))

}

{
    class Parent {
        constructor(name = 'xiaowu') {
            this.name = name
        }
        get longName() {
            return 'hls' + this.name
        }
        set longName(value) {
            this.name = value
        }
    }
    let v = new Parent()
    console.log('getter', v.longName);
    v.longName = 'hello'
    console.log('setter', v.longName);
    console.log('getter', v.longName);
}

{
    //静态方法
    class Parent {
        constructor(name = 'xiaoxiao') {
            this.name.name
        }
        static tell() {
            console.log('tell--静态');
        }
    }
    Parent.tell()

}



{
    class Parent {
        constructor(name = 'ddd') {
            this.name = name
        }
        static tell() {
            console.log('tell');

        }
    }
    Parent.type = 'testtype'
    console.log('静态属性', Parent.type)
}

{
    let ajax = function () {
        console.log('run 3')
        return Promise(function (resolve, reject) {
            setTimeout(function () {
                resolve()
            }, 1000)
        })
    }


}